﻿<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<!-- #include file="fckeditor.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(1)
dim id,rst,sqlt,specialname,specialengname,specialimg,specialvisible,content_chn,content_eng, template, orders, keyword_chn, keyword_eng
id=GetIntQueryString("id")
if id>0 then 
	Set rst = Server.CreateObject("ADODB.Recordset")
	sqlt = "select * from [c_special] where id="&id
	rst.open sqlt,conn,1,1
	If rst.eof Or rst.bof Then 
	response.redirect("showmsg.asp?from=special.asp&msg=NoRecord")
	else
	specialname=rst("specialname")
	specialengname=rst("specialengname")
	specialimg=rst("specialimg")
	specialvisible=rst("visible")
	content_chn=rst("content_chn")
	content_eng=rst("content_eng")
	template=rst("template")
	orders=rst("orders")
	keyword_chn=rst("keyword_chn")
	keyword_eng=rst("keyword_eng")
	End If 
	rst.close
	Set rst=Nothing 
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加/修改专题</title>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" src="admin_js/common.js"></script>
</head>
<body>
<br/>
<div id="specialdialog">
<form method="post" name="rzform" action="special_save.asp">
<table class="table_800" cellspacing="0" cellpadding="0">
<%If id>0 Then%>
<input type="hidden" name="act" value="modify"/>
<input type="hidden" name="id" value="<%=id%>"/>
<%else%>
<input type="hidden" name="act" value="add"/>
<%end if%>
<tr>
	<th colspan="2">添加/修改专题</th>
</tr>
<tr  class="row">
<td>专题名称</td>
<td><input type="text" name="specialname" id="specialname" size="20" value="<%=specialname%>"/></td>
</tr>
<tr  class="row">
<td>Special Name</td>
<td><input type="text" name="specialengname" id="specialengname" size="20" value="<%=specialengname%>"/></td>
</tr>
<tr class="row">
	<td>关键字</td>
	<td><input type="text" name="keyword_chn" id="keyword_chn" size="30" maxlength="100" value="<%=keyword_chn%>"/>使用空格分隔</td>
</tr>
<tr class="row">
	<td>Keyword</td>
	<td><input type="text" name="keyword_eng" id="keyword_eng" size="30" maxlength="100" value="<%=keyword_eng%>"/>使用空格分隔</td>
</tr>
<tr  class="row">
<td>专题图片</td>
<td>
<input type="text" id="specialimg" name="specialimg"  style="background-color:#CCCCCC;" id="specialimg" size="30"  value="<%=specialimg%>"/> <%if specialimg<>"" then%><a href="<%=specialimg%>" target="_blank">[查看]</a><%end if%><input type="button" name="copyimg" value="从已上传图片中选取" onclick="openWin('selectphoto.asp?photobox=specialimg',840,500);"/><br/>
<iframe marginwidth="0" marginheight="0" frameborder="0" style="width:400px;height:30px" src="rzupload.asp?parentform=rzform&inputname=specialimg" scrolling="no"></iframe>
</td>
</tr>
<tr  class="row">
<td>显示状态</td>
<td><input type="checkbox" id="visible" name="visible" value="1" <%if specialvisible=1 or id=0 then response.Write("checked='true'")%>/>（如果不选中，则不会显示本专题）</td>
</tr>
<tr  class="row">
<td>置顶级别</td>
<td><select name="orders">
	<option value="0"  <%If orders=0 Then response.write(" selected") End If %>>不置顶</option>
	<option value="1"  <%If orders=1 Then response.write(" selected") End If %>>一级置顶</option>
	<option value="2"  <%If orders=2 Then response.write(" selected") End If %>>二级置顶</option>
	</select>（置顶级别越大越靠前）
</td>
</tr>
<tr class="row">
	<td>栏目模板</td>
	<td>
	<select name="template" id="template">
	<%=ReadTemplateList("specialshow",template)%>
	</select>
	</td>
</tr>
<tr class="row">
	<td>中文内容</td>
	<td>
<%
Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/" ) )
Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath	= sBasePath
oFCKeditor.Config("ImageBrowser") = "true" 
oFCKeditor.Value	= content_chn
oFCKeditor.Create "content_chn"
%>
	</td>
</tr>
<tr class="row">
	<td>英文内容</td>
	<td>
<%
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath	= sBasePath
oFCKeditor.Config("ImageBrowser") = "true" 
oFCKeditor.Value	= content_eng
oFCKeditor.Create "content_eng"
%>
	</td>
</tr>
<tr  class="row"><td colspan="2" class="tdcenter"><input type="button" class="btn" onclick="checkForm('addspecial');" value="保存"/>&nbsp;&nbsp;<input type="reset" class="btn" value="重置"/>&nbsp;&nbsp;<input type="button" class="btn"  value="返回" onclick="javascript:location.href='special_list.asp'"/></td></tr>
</table>
</form>
</div>
</body>
</html>